/* NOTES to contributors:
 * use 4 spaces indents, and keep code ALIGNED and ORDERED */

/* default */
* {
    -GtkScrollbar-has-backward-stepper: false;
    -GtkScrollbar-has-forward-stepper: false;
    -GtkScrolledwindow-scrollbar-spacing: 0;
    -GtkScrolledwindow-scrollbars-within-bevel: 1;
    -textview-error-underline-color: @error_color;
    -GtkToolbutton-icon-spacing: 6;
    -GtkTreeview-expander-size: 8;

    background-clip: padding-box;

    outline-color: alpha(@theme_selected_bg_color, 0.5);
    outline-style: solid;
    outline-offset: 0;
}

/***************
 * base states *
 ***************/
.background {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}
 
* {
    /* inherit colors from parent */
    color: inherit;
    background-color: inherit;
}

*:selected,
*:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

*:selected:backdrop,
*:selected:focus:backdrop {
    background-color: shade(@theme_bg_color, 0.8);
    border-color: shade(@theme_bg_color, 0.8);
    color: @theme_fg_color;
}

*:disabled,
*:disabled:disabled {
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);

}

/* apply effects to insensitive and prelit images */
*:disabled {
    -gtk-icon-effect: dim;
}

*:hover {
    -gtk-icon-effect: highlight;
}

.gtkstyle-fallback {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}

.gtkstyle-fallback:hover {
    background-color: shade(@theme_bg_color, 1.1);
    color: @theme_fg_color;
}

.gtkstyle-fallback:active {
    background-color: shade(@theme_bg_color, 0.9);
    color: @theme_fg_color;
}

.gtkstyle-fallback:disabled {
    background-color: shade(shade(@theme_bg_color, 0.95), 1.05);
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

.gtkstyle-fallback:selected {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

image,
image:disabled,
label,
label:disabled,
box,
box:disabled,
GtkGrid,
GtkGrid:disabled {
    background-color: transparent;
}

/******************
 * visual effects *
 ******************/
/* transitions */
button {
    transition: border 100ms ease-in-out;
}

entry {
    transition: border 100ms ease-out;
}

entry:focus {
    transition: border 100ms ease-in;
}

entry image left {
    padding-right: 4px;
}

notebook tab label,
notebook .prelight-page,
notebook .prelight-page label,
notebook .active-page,
notebook .active-page label {
    transition: all 200ms ease-in;
}

/* inset shadows */
button:active,
.primary-toolbar button:active,
toolbar button:active,
headerbar button:active,
notebook header {
    box-shadow: inset 1px 0 alpha(@dark_shadow, 0.07),
                inset 0 1px alpha(@dark_shadow, 0.08),
                inset -1px 0 alpha(@dark_shadow, 0.07),
                inset 0 -1px alpha(@dark_shadow, 0.05);
}

/* disable inset shadow */
button:active *:disabled,
.primary-toolbar button:active *:disabled,
toolbar button:active *:disabled,
headerbar button:active *:disabled,
entry:disabled {
    box-shadow: none;
}

/*************
 * assistant *
 *************/
GtkAssistant .sidebar  highlight {
    font-weight: bold;
}

GtkAssistant .sidebar {
    padding: 4px;
    border-width: 0 1px 0 0;
    border-style: solid;
    border-right-color: shade(@theme_bg_color, 0.8);
    border-radius: 0;
    background-color: @theme_bg_color;
    color: mix(@theme_fg_color, @theme_bg_color, 0.1);
}

/****************
 * link buttons *
 ****************/
*:link, button:link, button:visited {
    color: @link_color;
}

*:link:visited, button:visited {
    color: mix(@link_color, @theme_fg_color, 0.2);
}

*:selected *:link:visited, *:selected button:visited:link, *:selected button:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.65);
}

*:link:hover, button:hover:link, button:hover:visited {
    color: shade(mix(@link_color, @theme_fg_color, 0.2), 1.15);
}

*:selected *:link:hover, *:selected button:hover:link, *:selected button:hover:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.75);
}

*:link:active, button:active:link, button:active:visited {
    color: shade(@link_color, 0.85);
}

*:selected *:link:active, *:selected button:active:link, *:selected button:active:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.5);
}

infobar.info *:link, infobar.info button:link, infobar.info button:visited, infobar.question *:link, infobar.question button:link, infobar.question button:visited, infobar.warning *:link, infobar.warning button:link, infobar.warning button:visited, infobar.error *:link, infobar.error button:link, infobar.error button:visited, *:link:selected, button:selected:link, button:selected:visited, headerbar.selection-mode .subtitle:link, .selection-mode.titlebar:not(headerbar) .subtitle:link,
*:selected *:link,
*:selected button:link,
*:selected button:visited {
    color: mix(@link_color, @theme_selected_fg_color, 0.5);
}

button:link > label, button:visited > label {
    text-decoration-line: underline;
}

/**********
 * button *
 **********/
button {
    padding: 3px 8px;
    border-width: 1px;
    border-radius: 5px;
    border-style: solid;
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: linear-gradient(to bottom,
                        @theme_base_color,
                        shade(@theme_base_color, 0.98)
                      );
    background-color: @theme_base_color;
    color: @theme_fg_color;
    box-shadow: 0 1px 2px alpha(@dark_shadow, 0.2);
}

button:checked {
    background-image: linear-gradient(to bottom,
                        shade(@selected_bg_color, 1.2),
                        shade(@selected_bg_color, 0.95)
                      );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.6);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.4);
}

button:focus:not(.combo):not(:backdrop) {
    background-image: linear-gradient(to bottom,
                        shade(@selected_bg_color, 1.25),
                        shade(@selected_bg_color, 0.99)
                      );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.65);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.5);
}

button:checked:backdrop {
    background-image: linear-gradient(to bottom,
                            shade(@selected_bg_color, 1.2),
                            shade(@selected_bg_color, 0.95)
                          );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.6);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.4);

}

button:backdrop {
    color: @theme_unfocused_fg_color;
}

button:disabled {
    color: alpha(@theme_fg_color, 0.7);
}

button:checked:disabled {
    border-color: shade(@theme_bg_color, 0.75);
    background-color: shade(@theme_bg_color, 0.80);
    background-image: linear-gradient(to bottom,
                        shade(@theme_bg_color, 0.89),
                        shade(@theme_bg_color, 0.85)
                      );
    box-shadow: 0 0 1px shade(@theme_bg_color, 0.6);
}

/* flat button */
button.flat,
button.flat:backdrop {
    padding: 3px 8px;
    border-width: 1px;
    border-radius: 5px;
    border-style: solid;
    box-shadow: none;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
}

button.flat:hover {
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: linear-gradient(to bottom,
                        shade(shade(@theme_bg_color, 1.02), 1.1),
                        shade(shade(@theme_bg_color, 1.02), 1.04)
                      );
    color: @theme_fg_color;
    box-shadow: 0 1px 2px alpha(@dark_shadow, 0.2);
}

button.flat:active,
button.flat:checked {
    background-image: linear-gradient(to bottom,
                        shade(@selected_bg_color, 1.2),
                        shade(@selected_bg_color, 0.95)
                      );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.6);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.4);
}

/****************
 * cell and row *
 ****************/
.cell {
    border-width: 0;
    border-radius: 0;
}

.cell:selected,
.cell:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

row {
    padding: 4px;
}

row:selected,
row:selected:hover,
row:selected:focus {
    border: none;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

/*******************
 * check and radio *
 *******************/
check,
radio,
check:disabled,
radio:disabled {
    border-style: none;
    background-color: transparent;
    padding: 4px;
}

checkbutton:hover,
checkbutton:active:hover,
checkbutton:selected,
checkbutton:selected:focus {
    background-color: transparent;
}

/*****************
 * treeview header *
 *****************/
treeview header button,
treeview header button:active {
    border-width: 0 1px 1px 0;
    border-radius: 0;
    box-shadow: none;
}

treeview header button,
treeview header button:active,
treeview header button:focus,
treeview header button:active:focus {
    border-color: shade(@theme_base_color, 0.9);
    border-bottom-color: shade(@theme_base_color, 0.9);
    background-color: shade(@theme_base_color, 0.97);
    background-image: none;
    box-shadow: none;
}

treeview header button:hover,
treeview header button:active:hover,
treeview header button:hover:focus,
treeview header button:active:hover:focus {
    border-color: shade(@theme_base_color, 0.9);
    border-bottom-color: shade(@theme_base_color, 0.9);
    background-color: shade(@theme_base_color, 0.99);
    background-image: none;
    box-shadow: none;
}

treeview header:last-child button {
    border-width: 0 0 1px 0;
}

/****************
 * content view *
 ****************/
.content-view.view {
    background-color: @theme_base_color;
}

.content-view.view :hover {
    background-color: alpha(@theme_selected_bg_color, 0.6);
}

.content-view.view :selected,
.content-view.view :active {
    background-color: @theme_selected_bg_color;
}

.content-view.view :disabled {
    background-color: shade(@theme_base_color, 0.9);
}

view.content-view {
}

view.content-view check {
    background-color: transparent;
}

view.content-view check:active {
    background-color: transparent;
}

.content-view.view check,
.content-view.view check:active {
    background-color: transparent;
}

view.content-view check:hover,
view.content-view check:disabled,
view.content-view check:selected {
    background-color: transparent;
}

/****************
 * drawing area *
 ****************/
GtkDrawingArea {
    background-color: @theme_base_color;
}

GtkDrawingArea:disabled {
    background-color: shade(@theme_base_color, 0.9);
}

/***********
 * gtkhtml *
 ***********/
GtkHTML {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

/***********
* calendar *
************/
calendar {
    padding: 4px;
}

calendar:indeterminate {
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

calendar view,
calendar header,
calendar button,
calendar button:hover,
calendar button:disabled {
    border-width: 0;
    background-color: transparent;
    background-image: none;
}

highlight,
calendar highlight {
    border-width: 0;
    background-color: transparent;
    color: @theme_selected_bg_color;
}

/************
 * combobox *
 ************/
button.combo:only-child {
    padding: 3px 8px;
}

combobox button:not(:only-child) {
    background-image: linear-gradient(to bottom,
                        shade(@selected_bg_color, 1.2),
                        shade(@selected_bg_color, 0.95)
                      );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.6);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.4);
}

combobox button:not(:only-child):disabled {
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: linear-gradient(to bottom,
                        shade(@theme_base_color, 0.95),
                        shade(@theme_base_color, 0.92)
                      );
    background-color: @theme_base_color;
    color: alpha(@theme_fg_color, 0.8);
    box-shadow: 0 1px 2px alpha(@dark_shadow, 0.2);
}

/*********
 * entry *
 *********/
entry {
    padding: 7px 4px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.95);
    border-radius: 4px;
    background-color: @theme_base_color;
    background-image: linear-gradient(to bottom,
                            @theme_base_color,
                            shade(@theme_base_color, 0.98)
                          );
    color: @theme_text_color;
    box-shadow: inset 0 -1px shade(@theme_bg_color, 0.8);
}

entry:active,
entry:focus {
    border-color: shade(@theme_bg_color, 0.95);
    box-shadow: inset 0 0 1px 3px shade(@theme_selected_bg_color, 1.5);
}

entry:selected,
entry:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
    box-shadow: inset 0 0 1px 3px shade(@theme_selected_bg_color, 1.15);
}

entry:disabled:backdrop,
entry:disabled {
    background-color: shade(@theme_bg_color, 0.95);
    background-image: none;
    color: mix(@theme_text_color, @theme_base_color, 0.5);
}

entry:backdrop {
    color: @theme_unfocused_fg_color;
    background-color: shade(@theme_bg_color, 1.05);
}

entry progress {
    border-width: 0;
    border-radius: 6px;
    box-shadow: none;
    background-color: @theme_bg_color;
    background-image: none;
    color: @theme_fg_color;
}

/* tweak to prevent double shadow in gedit search box */
entry entry {
    background-color: transparent;
    background-image: none;
    box-shadow: none;
    border: none;
}

/* nemo icon view entry */
.nemo-window .nemo-window-pane widget.entry {
    border: 1px solid;
    border-radius: 3px;
    color: @theme_fg_color;
    border-color: @theme_selected_bg_color;
    background-color: @theme_base_color;
}

  
.nemo-window .nemo-window-pane widget.entry:selected:focus, .nemo-window .nemo-window-pane widget.entry:selected {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/************
 * expander *
 ************/
expander arrow {
    min-width: 16px;
    min-height: 16px;
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
}

expander arrow:dir(rtl) {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl");
}

expander arrow:checked {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

expander {
    color: alpha(currentColor, 0.7);
}

expander:hover {
    color: alpha(currentColor, 0.8);
}

expander:checked {
    color: alpha(currentColor, 0.9);
}

/**************
 * list boxes *
 **************/
list {
    background-color: shade(@theme_bg_color, 0.97);
    color: @theme_fg_color;
}

list-row:hover {
    background-color: shade(@theme_bg_color, 1.02);
}

list-row:selected {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/*********
 * frame *
 *********/
frame > border {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
    box-shadow: none;
}

frame.flat > border,
frame > border.flat,
statusbar frame > border {
    border: none;
}

.frame {
	background: none;
}

/*******************
 * scrolled window *
 *******************/
scrolledwindow frame {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
}

/* avoid double borders when a viewport is
 * packed into a scrolledwindow */
scrolledwindow viewport frame {
    border-style: none;
}

/************
 * iconview *
 ************/
view.view.cell:selected,
view.view.cell:selected:focus {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 0px;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

.content-view.view.rubberband,
view rubberband,
.view.rubberband,
rubberband,
.rubberband {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 0;
    background-color: alpha(@theme_selected_bg_color, 0.3);
}

/***********
 * infobar *
 ***********/
infobar {
    border-width: 0;
    border-style: none;
}

.info {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@info_bg_color, 0.8);
    background-color: @info_bg_color;
    background-image: none;
    color: @info_fg_color;
}

.info button {
    border-top-color: shade(@info_bg_color, 0.8);
    border-right-color: shade(@info_bg_color, 0.72);
    border-left-color: shade(@info_bg_color, 0.72);
    border-bottom-color: shade(@info_bg_color, 0.7);
    background-color: shade(@info_bg_color, 1.08);
    color: @info_fg_color;
}

.info button:hover {
    border-top-color: shade(@info_bg_color, 0.85);
    border-right-color: shade(@info_bg_color, 0.78);
    border-left-color: shade(@info_bg_color, 0.78);
    border-bottom-color: shade(@info_bg_color, 0.7);
    background-color: shade(@info_bg_color, 1.10);
}

.info button:active {
    border-color: shade(@info_bg_color, 0.6);
    background-color: shade(@info_bg_color, 0.95);
}

.info button:active:hover {
    border-top-color: shade(@info_bg_color, 0.85);
    border-right-color: shade(@info_bg_color, 0.78);
    border-left-color: shade(@info_bg_color, 0.78);
    border-bottom-color: shade(@info_bg_color, 0.7);
}

.info button.close {
    color: @info_fg_color;
}

.info button.close:hover {
    background-color: alpha(white, 0.2);
}

.info button.close:active {
    color: @info_fg_color;
    background-color: alpha(black, 0.1);
}

.warning {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@warning_bg_color, 0.8);
    background-color: @warning_bg_color;
    background-image: none;
    color: @warning_fg_color;
}

.warning button {
    border-top-color: shade(@warning_bg_color, 0.8);
    border-right-color: shade(@warning_bg_color, 0.72);
    border-left-color: shade(@warning_bg_color, 0.72);
    border-bottom-color: shade(@warning_bg_color, 0.7);
    background-color: shade(@warning_bg_color, 1.08);
    color: @warning_fg_color;
}

.warning button:hover {
    border-top-color: shade(@warning_bg_color, 0.85);
    border-right-color: shade(@warning_bg_color, 0.78);
    border-left-color: shade(@warning_bg_color, 0.78);
    border-bottom-color: shade(@warning_bg_color, 0.7);
    background-color: shade(@warning_bg_color, 1.10);
}

.warning button:active {
    border-color: shade(@warning_bg_color, 0.6);
    background-color: shade(@warning_bg_color, 0.95);
}

.warning button:active:hover {
    border-top-color: shade(@warning_bg_color, 0.85);
    border-right-color: shade(@warning_bg_color, 0.78);
    border-left-color: shade(@warning_bg_color, 0.78);
    border-bottom-color: shade(@warning_bg_color, 0.7);
}

.warning button.close {
    color: @warning_fg_color;
}

.warning button.close:hover {
    background-color: alpha(white, 0.2);
}

.warning button.close:active {
    color: @warning_fg_color;
    background-color: alpha(black, 0.1);
}

.question {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@question_bg_color, 0.8);
    background-color: @question_bg_color;
    background-image: none;
    color: @question_fg_color;
}

.question button {
    border-top-color: shade(@question_bg_color, 0.8);
    border-right-color: shade(@question_bg_color, 0.72);
    border-left-color: shade(@question_bg_color, 0.72);
    border-bottom-color: shade(@question_bg_color, 0.7);
    background-color: shade(@question_bg_color, 1.08);
    color: @question_fg_color;
}

.question button:hover {
    border-top-color: shade(@question_bg_color, 0.85);
    border-right-color: shade(@question_bg_color, 0.78);
    border-left-color: shade(@question_bg_color, 0.78);
    border-bottom-color: shade(@question_bg_color, 0.7);
    background-color: shade(@question_bg_color, 1.10);
}

.question button:active {
    border-color: shade(@question_bg_color, 0.6);
    background-color: shade(@question_bg_color, 0.95);
}

.question button:active:hover {
    border-top-color: shade(@question_bg_color, 0.85);
    border-right-color: shade(@question_bg_color, 0.78);
    border-left-color: shade(@question_bg_color, 0.78);
    border-bottom-color: shade(@question_bg_color, 0.7);
}

.question button.close {
    color: @question_fg_color;
}

.question button.close:hover {
    background-color: alpha(white, 0.2);
}

.question button.close:active {
    color: @question_fg_color;
    background-color: alpha(black, 0.1);
}

.error {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@error_bg_color, 0.8);
    background-color: @error_bg_color;
    background-image: none;
    color: @error_fg_color;
}

.error button {
    border-top-color: shade(@error_bg_color, 0.8);
    border-right-color: shade(@error_bg_color, 0.72);
    border-left-color: shade(@error_bg_color, 0.72);
    border-bottom-color: shade(@error_bg_color, 0.7);
    background-color: shade(@error_bg_color, 1.08);
    color: @error_fg_color;
}

.error button:hover {
    border-top-color: shade(@error_bg_color, 0.85);
    border-right-color: shade(@error_bg_color, 0.78);
    border-left-color: shade(@error_bg_color, 0.78);
    border-bottom-color: shade(@error_bg_color, 0.7);
    background-color: shade(@error_bg_color, 1.10);
}

.error button:active {
    border-color: shade(@error_bg_color, 0.6);
    background-color: shade(@error_bg_color, 0.95);
}

.error button:active:hover {
    border-top-color: shade(@error_bg_color, 0.85);
    border-right-color: shade(@error_bg_color, 0.78);
    border-left-color: shade(@error_bg_color, 0.78);
    border-bottom-color: shade(@error_bg_color, 0.7);
}

.error button.close {
    color: @error_fg_color;
}

.error button.close:hover {
    background-color: alpha(white, 0.2);
}

.error button.close:active {
    color: @error_fg_color;
    background-color: alpha(black, 0.1);
}

/*******************
 * symbolic images *
 *******************/
image {
    color: alpha(currentColor, 0.5);
}

image:hover {
    color: alpha(currentColor, 0.9);
}

image:selected,
image:selected:hover {
    color: @theme_selected_fg_color;
}

view image,
view image:hover {
    color: alpha(currentColor, 0.9);
}

view image:selected,
view image:selected:hover {
    color: @theme_selected_fg_color;
}

/*****************
 * miscellaneous *
 *****************/
.floating-bar {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 4px;
    background-color: @theme_bg_color;
    background-image: none;
    color: @theme_fg_color;
}

.floating-bar top {
    border-top-width: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.floating-bar right {
    border-right-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.floating-bar bottom {
    border-bottom-width: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.floating-bar left {
    border-left-width: 0;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.floating-bar button {
    border-style: none;
    background-color: transparent;
    background-image: none;
}

.dim-label {
    color: alpha(currentColor, 0.5);
}

.dnd {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
}

grip {
    background-color: transparent;
}

arrow,
combobox arrow {
    color: alpha(currentColor, 0.7);
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
    min-height: 16px;
    min-width: 16px;
}

/********
 * menu *
 ********/
menu,
.menu,
treemenu menu,
toolbutton menu,
combobox menu,
.primary-toolbar menu,
.primary-toolbar button menu,
toolbar menu,
toolbar .primary-toolbar menu,
headerbar menu,
headerbar .primary-toolbar menu,
menu {
    margin: 4px;    /* avoid minify of menu */
    padding: 0;
    border-radius: 0;
    border-style: none;
    background-color: @menu_bg_color;
    color: @menu_fg_color;
}

.csd menu, .csd
.menu {
    padding: 4px 0px;
    border-radius: 4px;
    border: 1px solid shade(@theme_bg_color, 0.9);
    box-shadow: none;
}

menu:selected {
    background-color: @selected_bg_color;
}

menu button:hover,
menu button:active,
menu button:active *:disabled,
menu button:disabled,
menu button {
    border-width: 0;
    background-color: transparent;
    background-image: none;
}

.context-menu {
    font: initial;
}

menu > arrow.top,
.menu > arrow.top {
    margin-top: -3px;
    border-bottom: 1px solid shade(@theme_bg_color, 0.9);
    -gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
}

menu > arrow.bottom,
.menu > arrow.bottom {
    margin-bottom: -3px;
    border-top: 1px solid shade(@theme_bg_color, 0.9);
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

/***********
 * menubar *
 ***********/
menubar {
    -GtkWidget-window-dragging: true;

    border-style: none;
    background-color: @menubar_bg_color;
    background-image: none;
    color: @menubar_fg_color;
}

menubar:backdrop {
    background-image: none;
    color: @theme_unfocused_fg_color;
    background-color: @theme_unfocused_bg_color;
}

/***************
 * menubaritem *
 ***************/
menubar > menuitem {
    padding: 3px 5px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    color: @menubar_fg_color;
}

menubar > menuitem:hover {
    border-color: mix(@menubar_bg_color, @menubar_fg_color, 0.21);
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

menubar > menuitem *:hover {
    color: shade(@menubar_fg_color, 1.08);
}

menubar > menuitem:backdrop {
    color: @theme_unfocused_fg_color;
}

/************
 * menuitem *
 ************/
treemenu menuitem {
    padding: 0;
    border-width: 0;
}

menuitem,
menu menuitem {
    padding: 3px;
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-radius: 0;
    background-color: @menu_bg_color;
    background-image: none;
    color: @menu_fg_color;
}

menu menuitem:hover,
menu menuitem:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
    background-image: none;
}

menu menuitem:active,
menu menuitem *:active,
menu menuitem:hover,
menu menuitem *:hover {
    color: @theme_selected_fg_color;
}

menu menuitem:disabled,
menu menuitem *:disabled {
    color: mix(@menu_fg_color, @menu_bg_color, 0.5);
}

/* menu arrow */
menu menuitem arrow,
.menu menuitem arrow {
    min-height: 16px;
    min-width: 16px;
}

menu menuitem arrow:dir(ltr),
.menu menuitem arrow:dir(ltr) {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
    margin-left: 10px;
}

menu menuitem arrow:dir(rtl),
.menu menuitem arrow:dir(rtl) {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic-rtl");
    margin-right: 10px;
}

menuitem check,
menuitem radio,
menuitem check:hover,
menuitem radio:hover,
menuitem check:disabled,
menuitem radio:disabled {
    border-style: none;
    min-width: 16px;
    min-height: 16px;
    background-color: transparent;
    background-image: none;
}

menuitem check:active,
menuitem radio:active {
    border-style: none;
    background-color: transparent;
}

menuitem calendar:indeterminate {
    color: mix(@menu_fg_color, @menu_bg_color, 0.5);
}

menuitem calendar button {
    border-style: none;
    background-color: transparent;
    background-image: none;
}

menuitem entry {
    border-color: shade(@menu_bg_color, 0.7);
    background-color: @menu_bg_color;
    background-image: none;
    color: @menu_fg_color;
}

menuitem entry:active,
menuitem entry:focus {
    border-color: shade(@menu_bg_color, 0.7);
}

menuitem accelerator {
    color: alpha(@menu_fg_color, 0.6);
}

menuitem accelerator:hover {
    color: alpha(@theme_selected_fg_color, 0.8);
}

menuitem accelerator:disabled {
    color: alpha(mix(@menu_fg_color, @menu_bg_color, 0.5), 0.6);
}

modelbutton > image {
    padding-right: 4px;
}

/************
 * popovers *
 ************/
popover {
    margin: 10px;
    padding: 2px;
    border-radius: 4px;
    border-color: shade(@theme_bg_color, 0.85);
    border-width: 1px;
    border-style: solid;
    background-clip: border-box;
    background-color: @theme_bg_color;
    color: @theme_fg_color;
    box-shadow: 0 2px 3px alpha(black, 0.5);
}

popover.osd {
    box-shadow: 0 2px 7px 3px alpha(black, 0.5);
}

popover >  list,
popover > view,
popover > toolbar {
    background-color: transparent;
}

popover.osd > toolbar button {
    border-radius: 0;
    border-width: 0;
    background-image: none;
    background-color: transparent;
}

popover separator {
    border: 0;
    background-color: transparent;
    color: alpha(currentColor, 0.5);
    font-size: 80%;
    font-weight: bold;
}

modelbutton.flat,
modelbutton.flat:active,
modelbutton.flat:disabled,
modelbutton.flat:active:disabled {
    padding: 2px 8px;
    background-color: transparent;
    background-image: none;
    border-color: transparent;
    border-style: none;
    box-shadow: none;
    color: @theme_fg_color;
}

modelbutton:hover,
modelbutton:selected,
modelbutton:active:hover {
    border-width: 0;
    border-color: transparent;
    background-color: @theme_selected_bg_color;
    background-image: none;
    color: @theme_selected_fg_color;
}

modelbutton.flat arrow.left {
    -gtk-icon-source: -gtk-icontheme("pan-start-symbolic");
}

modelbutton.flat arrow.right {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
}

popover.background,
.csd popover.background {
    box-shadow: 0 0 2px 0px gray;
    border: 1px solid @borders;
}

popover.background:backdrop {
    background-color: @theme_bg_color;
    box-shadow: none;
}

/************
 * notebook *
 ************/
notebook {
    padding: 0;
    border-width: 0;
    border-style: solid;
    border-color: shade(@theme_base_color, 0.7);
    border-radius: 0;
    background-color: @theme_base_color;
    background-image: none;
    background-clip: border-box;
}

notebook frame {
    border-width: 0;
}

notebook > header {
    border-width: 0;
    box-shadow: none;
    background-color: shade(@theme_base_color, 0.8);
}

notebook > header .frame {
    border-color: transparent;
}

notebook view {
    border-width: 0;
    background-color: @theme_base_color;
    color: @theme_text_color;
}

notebook > stack:not(:only-child) {
    background-color: @theme_base_color;
    border: 1px solid shade(@theme_bg_color, 0.8);
    box-shadow: none;
}

notebook tab {
    padding: 4px 20px;
    border: 1px solid shade(@theme_bg_color, 0.78);
    background-image: linear-gradient(to bottom,
                        shade(@theme_bg_color, 0.83),
                        shade(@theme_bg_color, 0.8)
                      );
}

notebook tab:checked {
    background-image: linear-gradient(to bottom,
                        shade(@theme_bg_color, 0.95),
                        shade(@theme_bg_color, 0.9)
                      );
    border-color: shade(@theme_bg_color, 0.75);
}

notebook tab:backdrop {
    color: @theme_unfocused_fg_color;
    background-image: none;
    background-color: shade(@theme_unfocused_bg_color, 0.9);
    border-color: shade(@theme_unfocused_bg_color, 0.87);
}

notebook tab:checked:backdrop {
    color: @theme_unfocused_fg_color;
    background-image: none;
    background-color: shade(@theme_unfocused_bg_color, 0.95);
    border-color: shade(@theme_unfocused_bg_color, 0.9);
}

notebook tab label {
    /*color: mix(@theme_text_color, @theme_base_color, 0.3);*/
}

notebook .active-page,
notebook tab .active-page label {
    color: @theme_text_color;
}

/* close button styling */
notebook tab button,
notebook tab button:hover,
notebook tab button:focus,
notebook tab button:active,
notebook tab button:checked,
notebook tab button:active:hover,
notebook tab button:checked:hover,
notebook tab button:backdrop,
notebook tab:checked button,
notebook tab:checked button:hover,
notebook tab:checked button:focus,
notebook tab:checked button:active,
notebook tab:checked button:checked,
notebook tab:checked button:active:hover,
notebook tab:checked button:checked:hover,
notebook tab:checked button:backdrop {
    border-color: transparent;
    box-shadow: none;
    background-color: transparent;
    background-image: none;
    color: @theme_fg_color;
}

notebook > header.top > tabs > arrow.up,
notebook > header.bottom > tabs > arrow.up {
    -gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
}

notebook > header.top > tabs > arrow.up:last-child,
notebook > header.bottom > tabs > arrow.up:last-child {
    margin-left: 2px;
}

notebook > header.top > tabs > arrow.down,
notebook > header.bottom > tabs > arrow.down {
    -gtk-icon-source: -gtk-icontheme("pan-start-symbolic");
}

notebook > header.top > tabs > arrow.down:first-child,
notebook > header.bottom > tabs > arrow.down:first-child {
    margin-right: 2px;
}

notebook > header.left > tabs > arrow.up,
notebook > header.right > tabs > arrow.up {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

notebook > header.left > tabs > arrow.up:last-child,
notebook > header.right > tabs > arrow.up:last-child {
    margin-top: 2px;
}

notebook > header.left > tabs > arrow.down,
notebook > header.right > tabs > arrow.down {
    -gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
}

notebook > header.left > tabs > arrow.down:first-child,
notebook > header.right > tabs > arrow.down:first-child {
    margin-bottom: 2px;
}

notebook > header > tabs > arrow {
    color: @theme_fg_color;
}

notebook > header > tabs > arrow:hover {
    color: shade(@theme_fg_color, 1.2);
}

notebook > header > tabs > arrow:active {
    color: shade(@theme_fg_color, 0.8);
}

notebook > header > tabs > arrow:disabled {
    color: shade(@theme_bg_color, 0.6);
}

/******************
 * pane separator *
 ******************/
paned > separator {
    background-color: shade(@theme_bg_color, 0.95);
    color: transparent;
    border-style: none;
}

paned .sidebar.left,
paned .sidebar.right,
paned .sidebar.left:dir(rtl),
paned .sidebar:dir(rtl),
paned .sidebar:dir(ltr),
paned .sidebar {
    border-style: none;
}

/**************
 * over under *
 **************/
overshoot.top {
    background-image: -gtk-gradient(radial, center top, 0, center top, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
    background-size: 100% 60%;
    background-repeat: no-repeat;
    background-position: center top;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

overshoot.bottom {
    background-image: -gtk-gradient(radial, center bottom, 0, center bottom, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
    background-size: 100% 60%;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

overshoot.left {
    background-image: -gtk-gradient(radial, left center, 0, left center, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
    background-size: 60% 100%;
    background-repeat: no-repeat;
    background-position: left center;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

overshoot.right {
    background-image: -gtk-gradient(radial, right center, 0, right center, 0.6, from(rgba(64, 128, 251, 0.2)), to(rgba(64, 128, 251, 0)));
    background-size: 60% 100%;
    background-repeat: no-repeat;
    background-position: right center;
    background-color: transparent;
    border: none;
    box-shadow: none;
}


undershoot.top {
    background-color: transparent;
    background-image: linear-gradient(to left, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
    padding-top: 1px;
    background-size: 10px 1px;
    background-repeat: repeat-x;
    background-origin: content-box;
    background-position: center top;
}

undershoot.bottom {
    background-color: transparent;
    background-image: linear-gradient(to left, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
    padding-bottom: 1px;
    background-size: 10px 1px;
    background-repeat: repeat-x;
    background-origin: content-box;
    background-position: center bottom;
}

undershoot.left {
    background-color: transparent;
    background-image: linear-gradient(to top, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
    padding-left: 1px;
    background-size: 1px 10px;
    background-repeat: repeat-y;
    background-origin: content-box;
    background-position: left center;
}

undershoot.right {
    background-color: transparent;
    background-image: linear-gradient(to top, rgba(255, 255, 255, 0.2) 50%, rgba(0, 0, 0, 0.2) 50%);
    padding-right: 1px;
    background-size: 1px 10px;
    background-repeat: repeat-y;
    background-origin: content-box;
    background-position: right center;
}

.overlay-bar {
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    padding: 3px 6px;
    margin: 3px;
}

.overlay-bar label {
    color: @tooltip_fg_color;
}

/*************************
 * progressbar and scale *
 *************************/
progressbar {
    padding: 0;
    border-width: 0px;
    border-radius: 8px;
    background-color: transparent;
}

progressbar progress,
treeview.view.progressbar,
treeview.view.progressbar:focus {
    border: none;
    border-radius: 8px;
    color: @theme_selected_fg_color;
    background-color: @theme_selected_bg_color;
}

row:selected progressbar progress,
treeview.view.progressbar:selected,
treeview.view.progressbar:selected:focus,
treeview.view.progressbar:focus:selected,
treeview.view.progressbar:focus:selected:focus {
    color: @theme_selected_fg_color;
    background-color: @theme_selected_fg_color;
}

progressbar progress:backdrop {
    background-image: image(shade(@theme_unfocused_bg_color, 0.85));
}

progressbar trough,
treeview.view.trough,
row:selected progressbar trough {
    border: none;
    border-radius: 8px;
    color: @theme_fg_color;
    background-color: shade(@theme_bg_color, 0.9);
}

treeview.view.trough:selected,
treeview.view.trough:selected:focus {
    color: @theme_fg_color;
    background-color: shade(@theme_bg_color, 0.85);
}

progressbar trough:backdrop {
    background-color: shade(@theme_unfocused_bg_color, 0.95);
}

/* level bars as used for password quality or remaining power */
levelbar trough {
    padding: 1px;
    border-radius: 4px;
}

levelbar block {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
}

levelbar.indicator-continuous block {
    padding: 1px;
    border-radius: 4px;
}

levelbar.indicator-discrete block.horizontal {
    margin: 0 1px;
}

levelbar.indicator-discrete block.vertical {
    margin: 1px 0;
}

/* discrete indicator border rounding,
   uncomment when :nth-child will be working
   on the widget

levelbar.indicator-discrete block.horizontal:first-child {
    border-radius: 2px 0 0 2px;
}

levelbar.indicator-discrete block.horizontal:last-child {
    border-radius: 0 2px 2px 0;
}

levelbar.indicator-discrete block.vertical:first-child {
    border-radius: 2px 2px 0 0;
}

levelbar.indicator-discrete block.vertical:last-child {
    border-radius: 0 0 2px 2px;
}
*/

levelbar block.high {
    border-color: shade(@success_color, 0.85);
    background-image: linear-gradient(to bottom,
                        shade(@success_color, 1.2),
                        @success_color 75%,
                        shade(@success_color, 0.95)
                      );
}

levelbar block.low {
    border-color: shade(@warning_color, 0.80);
    background-image: linear-gradient(to bottom,
                        shade(@warning_color, 1.3),
                        @warning_color 75%,
                        shade(@warning_color, 0.9)
                      );
}

levelbar block.empty {
    border-color: alpha(@theme_fg_color, 0.1);
    background-color: transparent;
    background-image: none;
}

/*********
 * Scale *
 *********/
scale {
    padding: 11px 5px;
    min-height: 10px;
    min-width: 10px;
    background-color: transparent;
}

scale.vertical {
    padding: 5px 11px;
}

scale slider {
    border-radius: 8px;
    border: none;
    background-color: shade(@theme_bg_color, 1.08);
    background-image: none;
    box-shadow: 0 2px 2px 1px rgba(0,0,0,0.09);

    /* widget sizing */
    min-height: 17px;
    min-width: 17px;
    margin: -8px;
}

scale slider:disabled {
    background-color: shade(@theme_bg_color, 0.95);
    background-image: none;
}

scale.fine-tune slider:active,
scale.fine-tune slider:active:hover,
scale.fine-tune slider.horizontal:active,
scale.fine-tune slider.horizontal:active:hover {
    background-repeat: no-repeat;
    background-position: center;
}

scale marks {
    color: alpha(currentColor,0.55);
}

scale marks.top,
scale.fine-tune marks.top {
    margin-bottom: 6px;
    margin-top: -12px;
}

scale marks.bottom,
scale.fine-tune marks.bottom {
    margin-top: 6px;
    margin-bottom: -12px;
}

scale marks.top,
scale.fine-tune marks.top {
    margin-right: 6px;
    margin-left: -12px;
}

scale marks.bottom,
scale.fine-tune marks.bottom {
    margin-left: 6px;
    margin-right: -12px;
}

scale.horizontal indicator {
    min-height: 6px;
    min-width: 1px;
}

scale.vertical indicator {
    min-height: 1px;
    min-width: 6px;
}

scale trough {
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 4px;
    background-color: shade(@theme_bg_color, 1.08);
    background-image: none;
}

/* scale trough margin */
scale trough {
    margin: 11px 9px;
}

scale trough.vertical {
    margin: 9px 11px;
}

scale highlight {
    border-radius: 4px;
    border-color: @theme_selected_bg_color;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

scale trough:disabled,
scale highlight left:disabled {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;
}

scale value {
    color: alpha(currentColor,0.55); 
}

/*************
 * scrollbar *
 *************
 
  scrollbar: normal scrollbar for normal usage
  scrollbar-overlay: scrollbar showing scrolling progress
  scrollbar.fine-tune: on long press on slider
*/
 
scrollbar {
    background-color: shade(@theme_bg_color, 0.9);
    transition: 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

scrollbar trough {
    border-radius: 0;
}

scrollbar:backdrop {
    background-color: shade(@theme_bg_color, 0.9);
    border-color: shade(@borders, 0.95);
    transition: 200ms ease-out;
}

scrollbar slider {
    min-width: 8px;
    min-height: 8px;
    margin: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background-clip: padding-box;
    background-color: shade(@theme_bg_color, 0.6);
    transition: 200ms ease-out;
}

scrollbar slider:hover {
    background-color: shade(@theme_bg_color, 0.6);
}

scrollbar slider:hover:active {
    background-color: shade(@theme_bg_color, 0.55);
}

scrollbar slider:backdrop {
    background-color: shade(@theme_bg_color, 0.55);
}

scrollbar slider:disabled {
    background-color: transparent;
}

scrollbar.fine-tune slider {
    min-width: 8px;
    min-height: 8px;
}

scrollbar.fine-tune.horizontal slider {
    border-width: 2px;
}

scrollbar.fine-tune.vertical slider {
    border-width: 2px;
}

scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
    border-color: shade(@theme_bg_color, 0.85);
    opacity: 1;
    margin: 0;
/*    background-color: shade(@theme_bg_color, 0.9);*/
    background-color: transparent;
}

scrollbar.overlay-indicator:not(.dragging):not(.hovering) slider {
    margin: 0;
    min-width: 1px;
    min-height: 1px;
    background-color: shade(@theme_bg_color, 0.6);
    border: 2px solid transparent;
}

scrollbar.overlay-indicator:not(.dragging):not(.hovering) button {
    min-width: 12px;
    min-height: 12px;
    background-color: transparent;
    background-clip: padding-box;
    border-radius: 0;
    border: none;
    -gtk-icon-source: none;
}

scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal slider {
    margin: 0 2px;
    min-width: 40px;
}

scrollbar.overlay-indicator:not(.dragging):not(.hovering).horizontal button {
    margin: 1px 2px;
    min-width: 5px;
}

scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical slider {
    margin: 2px 0;
    min-height: 40px;
}

scrollbar.overlay-indicator:not(.dragging):not(.hovering).vertical button {
    margin: 2px 1px;
    min-height: 5px;
}

scrollbar.overlay-indicator.dragging, scrollbar.overlay-indicator.hovering {
    opacity: 1;
}

scrollbar.horizontal slider {
    min-width: 40px;
}

scrollbar.vertical slider {
    min-height: 40px;
}

scrollbar button {
    padding: 0;
    min-width: 12px;
    min-height: 12px;
    border-style: none;
    border-radius: 0;
    transition-property: min-height, min-width, color;
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    -gtk-icon-shadow: none;
    color: #787c7d;
}

scrollbar button:hover {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    -gtk-icon-shadow: none;
    color: #535859;
}

scrollbar button:active, scrollbar button:checked {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    -gtk-icon-shadow: none;
    color: @borders;
}

scrollbar button:disabled {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    -gtk-icon-shadow: none;
    color: rgba(120, 124, 125, 0.2);
}

scrollbar button:backdrop {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    -gtk-icon-shadow: none;
    color: #c3c4c4;
}

scrollbar button:backdrop:disabled {
    border-color: transparent;
    background-color: transparent;
    background-image: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
    text-shadow: none;
    -gtk-icon-shadow: none;
    color: rgba(195, 196, 196, 0.2);
}

scrollbar.vertical button.down {
    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
}

scrollbar.vertical button.up {
    -gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
}

scrollbar.horizontal button.down {
    -gtk-icon-source: -gtk-icontheme("pan-right-symbolic");
}

scrollbar.horizontal button.up {
    -gtk-icon-source: -gtk-icontheme("pan-left-symbolic");
}

treeview ~ scrollbar.vertical {
    border-top: 1px solid @borders;
    margin-top: -1px;
}


/*************
 * separator *
 *************/
.sidebar view separator,
view separator,
.separator,
separator {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

button > separator,
button separator {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

button > separator:disabled,
button separator:disabled {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

.primary-toolbar GtkSeparatorToolItem,
.primary-toolbar separator,
.primary-toolbar separator:disabled,
toolbar GtkSeparatorToolItem,
toolbar separator,
toolbar separator:disabled {
    min-width: 1px;
    min-height: 1px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: image(shade(@borders, 0.95));
    background-size: 1px 1px;
}

headerbar GtkSeparatorToolItem,
headerbar separator,
headerbar separator:disabled,
.titlebar GtkSeparatorToolItem,
.titlebar separator,
.titlebar separator:disabled {
    -GtkWidget-window-dragging: true;

    min-width: 1px;
    min-height: 1px;
    margin-bottom: 4px;
    margin-top: 4px;
    -gtk-icon-source: none;
    border-style: none;
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                        shade(@borders, 0.8),
                        shade(@borders, 0.7)
                      );
    background-size: 1px 1px;
}

.primary-toolbar button separator,
.primary-toolbar > button separator,
toolbar button separator,
toolbar button > separator {
    border-color: shade(@toolbar_bg_color, 0.95);
}

headerbar button separator,
headerbar button > separator,
.titlebar button separator,
.titlebar button > separator {
    border-color: shade(@titlebar_bg_color, 0.95);
}

.primary-toolbar button separator:disabled,
.primary-toolbar > button separator:disabled,
toolbar button separator:disabled,
toolbar button > separator:disabled {
    border-color: shade(@toolbar_bg_color, 0.85);
}

headerbar button separator:disabled,
headerbar button > separator:disabled,
.titlebar button separator:disabled,
.titlebar button > separator:disabled {
    border-color: shade(@titlebar_bg_color, 0.85);
}

menuitem separator {
    border-width: 1px;
    border-style: none;
    color: shade(@menu_bg_color, 0.98);
}

combobox separator {
    border-style: none;
}

/***********
 * sidebar *
 ***********/
.sidebar,
.sidebar view,
.sidebar > view,
.sidebar scrolledwindow {
    background-color: @theme_bg_color;
    color: mix(@theme_fg_color, @theme_bg_color, 0.1);
}

.sidebar row:selected,
.sidebar row:selected:hover,
.sidebar row:selected:focus,
.sidebar view row:selected,
.sidebar view row:selected:hover,
.sidebar view row:selected:focus {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.85);
    background-image: none;
    color: @theme_fg_color;
}

.sidebar row:hover,
.sidebar view row:hover {
    border-color: shade(@theme_bg_color, 0.95);
    background-color: shade(@theme_bg_color, 0.95);
    background-image: none;
    color: @theme_fg_color;
}

.sidebar row:selected:hover,
.sidebar view row:selected:hover {
    border-color: shade(@theme_bg_color, 0.9);
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;
    color: @theme_fg_color;
}

.sidebar frame {
    border-width: 0;
}

/* nemo sidebar padding */
NemoWindow .sidebar .cell {
    padding: 2px 2px; 
}

/*filechooser placessidebar.sidebar,
.nautilus-window placessidebar.sidebar {
  background-color: @theme_bg_color;
}


filechooser placessidebar.sidebar:backdrop,
.nautilus-window placessidebar.sidebar:backdrop {
    background-color: @theme_fg_color;
}
*/

.nemo-window .sidebar {
  background-color: @theme_bg_color;
}

.nemo-window .sidebar .view,
.nemo-window .sidebar iconview,
.nemo-window .sidebar row {
  background-color: transparent;
}

.nemo-window .sidebar .view.cell:selected,
.nemo-window .sidebar iconview.cell:selected,
.nemo-window .sidebar row.cell:selected {
  border-color: shade(@theme_bg_color, 0.85);
  background-color: shade(@theme_bg_color, 0.85);
  background-image: none;
  color: @theme_fg_color;
}

/* .nemo-window .sidebar .view.expander, .nemo-window .sidebar iconview.expander, .nemo-window .sidebar row.expander {
  color: #787e8a;
}
 */
/* .nemo-window .sidebar .view.expander:hover, .nemo-window .sidebar iconview.expander:hover, .nemo-window .sidebar row.expander:hover {
  color: #BAC3CF;
}
 */
.nemo-window .sidebar separator {
  background-color: transparent;
}


/* Sidebar spacing for 3.20 */
placessidebar > viewport.frame {
    border-style: none;
}

placessidebar row {
    min-height: 36px;
    padding: 0px;
}

placessidebar row > revealer {
    padding: 0 14px;
}

placessidebar row image.sidebar-icon {
    opacity: 0.7;
}

placessidebar row image.sidebar-icon:dir(ltr) {
    padding-right: 8px;
}

placessidebar row image.sidebar-icon:dir(rtl) {
    padding-left: 8px;
}

placessidebar row label.sidebar-label:dir(ltr) {
    padding-right: 2px;
}

placessidebar row label.sidebar-label:dir(rtl) {
    padding-left: 2px;
}

button.sidebar-button {
    min-height: 26px;
    min-width: 26px;
    margin-top: 3px;
    margin-bottom: 3px;
    padding: 0;
    border-radius: 100%;
    -gtk-outline-radius: 100%;
}

/**************
 * spinbutton *
 **************/
/* HORIZONTAL */
spinbutton.horizontal entry {
    border-bottom-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: 7px 15px;
}

spinbutton.horizontal button.down {
    border-radius: 0;
    border-right-width: 0;
    border-left-width: 0;
    box-shadow: none;
    margin-right: 0;
}

spinbutton.horizontal button.up {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 0;
    box-shadow: none;
}

/* VERTICAL */
spinbutton.vertical entry {
    border-radius: 0;
    box-shadow: none;
    background-image: none;
    border-color: shade(@theme_bg_color, 0.85);
}

spinbutton.vertical button.up {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-width: 0;
    box-shadow: none;
    background-image: none;
}

spinbutton.vertical button.down {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top-width: 0;
    box-shadow: none;
    background-image: none;
}

/***********
 * spinner *
 ***********/
@keyframes spin {
    to {
        -gtk-icon-transform: rotate(1turn);
    }
}

spinner {
    background: none;
    opacity: 0;
    -gtk-icon-source: -gtk-icontheme("process-working-symbolic");
}

spinner:checked {
    opacity: 1;
    animation: spin 1s linear infinite;
}

spinner:checked:disabled {
    opacity: 0.5;
}


/*************
 * statusbar *
 *************/
statusbar {
    padding: 4px;
    color: @theme_fg_color;
}

statusbar > frame {
    border-width: 0;
}

/**********
 * switch *
 **********/
switch {
    font-weight: bold;
    font-size: 0;
    outline-offset: -4px;
    margin: 4px;
    border: 1px solid @borders;
    border-radius: 16px;
    background-color: @borders;
}

switch:checked {
    border-color: #4ed464;
    background-color: #4ed464;
    text-shadow: 0 0 rgba(24, 68, 114, 0), 0 0 0 rgba(255, 255, 255, 0);
}

switch:disabled {
    border-color: shade(@theme_base_color, 0.85);
    background-color: shade(@theme_base_color, 0.85);
    text-shadow: none;
}

switch:backdrop {
    box-shadow: none;
    color: transparent;
    border-color: shade(@borders, 0.95);
    background-color: shade(@borders, 0.95);
    transition: 200ms ease-out;
}

switch:backdrop:checked {
    color: transparent;
    border-color: shade(#4ed464, 0.8);
    background-color: shade(#4ed464, 0.8);
}

switch slider {
    min-width: 20px;
    min-height: 20px;
    border: none;
    border-radius: 20px;
    transition: all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: @theme_fg_color;
    outline-color: rgba(46, 52, 54, 0.3);
    background-color: @theme_base_color;
    box-shadow: 0 2px 2px 1px rgba(0,0,0,0.09);
}

switch:disabled slider {
    background-color: shade(@borders, 1.065);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
}

switch:backdrop slider {
    transition: 200ms ease-out;
    background-color: shade(@theme_unfocused_bg_color, 1.1);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0);
}

row:selected switch {
    box-shadow: none;
}

row:selected switch:backdrop {
    border-color: shade(@theme_selected_bg_color, 0.6);
}

row:selected switch.slider:dir(rtl) {
}

row:selected switch.slider:dir(ltr) {
}

row:selected switch.slider:checked, row:selected switch.slider {
}

/************
 * textview *
 ************/
textview {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

/* Firefox adress bar */
label.separator {
    color: @theme_fg_color;
}

label.separator:backdrop {
    color: shade(@theme_fg_color, 0.9);
}

label selection {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

label:backdrop {
    color: alpha(@theme_fg_color, 0.5);
}

/* Textview selection background */
.view:selected:focus,
iconview:selected:focus,
.view:selected,
iconview:selected,
.view text:selected:focus,
iconview text:selected:focus,
textview text:selected:focus,
.view text:selected,
iconview text:selected,
textview text:selected,
.view text selection:focus,
iconview text selection:focus,
.view text selection,
iconview text selection,
textview text selection:focus,
textview text selection,
flowbox flowboxchild:selected,
spinbutton:not(.vertical) selection:focus,
 spinbutton:not(.vertical) selection,
entry selection:focus,
entry selection,
modelbutton.flat:selected,
popover.background checkbutton:selected,
popover.background radiobutton:selected,
.menuitem.button.flat:selected,
treeview.view:selected:focus,
treeview.view:selected,
row:selected, calendar:selected {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/*****************
 * color chooser *
 *****************/
colorswatch,
colorswatch:selected {
    border-width: 1px;
    border-style: solid;
    border-color: alpha(black, 0.1);
    border-radius: 1px;
    background-color: transparent;
    background-clip: border-box;
}

colorswatch:hover,
colorswatch:selected:hover {
    border-color: alpha(black, 0.3);
}

colorswatch.color-dark:hover {
}

colorswatch.color-light:hover {
}

colorswatch.color-light:selected:hover,
colorswatch.color-dark:selected:hover {
    background-image: none;
}

colorswatch left,
colorswatch:first-child {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

colorswatch right,
colorswatch:last-child {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}

colorswatch:only-child {
    border-radius: 4px;
}

colorswatch top {
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
}

colorswatch bottom {
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
}

colorchooser #add-color-button {
    background-clip: padding-box;
    border-color: alpha(black, 0.1);
    background-color: shade(@theme_bg_color, 0.95);
    color: @theme_fg_color;
}

colorchooser #add-color-button:hover {
    border-color: alpha(black, 0.3);
    background-color: shade(@theme_bg_color, 0.90);
    color: @theme_fg_color;
}
/*
.color-active-badge,
.color-active-badge:selected {
    border-width: 1px;
    border-style: solid;
    border-width: 2px;
    background-color: transparent;
}

.color-active-badge.color-light,
.color-active-badge.color-light:hover {
    border-color: alpha(black, 0.3);
    color: alpha(black, 0.3);
}

.color-active-badge.color-dark,
.color-active-badge.color-dark:hover {
    border-color: alpha(white, 0.3);
    color: alpha(white, 0.3);
}

GtkColorEditor colorswatch {
    border-radius: 4px;
}

GtkColorEditor colorswatch.color-dark:hover,
GtkColorEditor colorswatch.color-light:hover {
    background-image: none;
    border-color: alpha(black, 0.3);
}
*/

button.color {
    padding: 2px;
}

/************
 * Pathbars *
 ************/
.path-bar button.text-button, .path-bar button.image-button, .path-bar button {
  padding-left: 4px;
  padding-right: 4px;
}

.path-bar button.text-button.image-button label {
  padding-left: 0;
  padding-right: 0;
}

.path-bar button.text-button.image-button label:last-child, .path-bar button label:last-child {
  padding-right: 8px;
}

.path-bar button.text-button.image-button label:first-child, .path-bar button label:first-child {
  padding-left: 8px;
}

.path-bar button image {
  padding-left: 4px;
  padding-right: 4px;
}

.path-bar button.slider-button {
  padding-left: 0;
  padding-right: 0;
}

.path-bar button.slider-button:dir(ltr) {
  border-right-width: 0;
}

  
/**************
 * headerbar *
 **************/
headerbar {
    padding: 4px 8px;
    border-width: 0px;
    border-style: solid;
    border-color: shade(@titlebar_bg_color, 0.7);
    border-bottom-width: 1px;
    background-color: transparent;
    background-image: none;
    color: @titlebar_fg_color;
}

headerbar:backdrop {
    background-color: transparent;
    background-image: none;
    color: @theme_unfocused_fg_color;
}

headerbar button.image-button {
    padding: 6px;
}
/* pantheon photos label fix */
headerbar .title {
    font-weight: bold;
}

headerbar .subtitle {
    font-size: smaller;
}

headerbar combobox,
headerbar button {
    padding: 4px 8px;
    box-shadow: none;
}

headerbar button:checked,
headerbar button:checked:backdrop {
    background-image: image(shade(@theme_bg_color, 0.5));
    color: @theme_selected_fg_color;
    border-color: shade(@theme_bg_color, 0.55);
    box-shadow: none;
}

headerbar entry {
    padding: 7.5px 8px;
    border: none;
}

/***********
 * toolbar *
 ***********/
toolbar {
    padding: 4px;
    border-style: none;
    background-color: @toolbar_bg_color;
    background-image: none;
    color: @toolbar_fg_color;
}

toolbar:backdrop {
    background-image: none;
    color: @theme_unfocused_fg_color;
    background-color: @theme_unfocused_bg_color;
}

toolbar button {
    padding: 2px 2px;
}

toolbar:disabled {
    background-color: shade(@toolbar_bg_color, 0.9);
    color: mix(@toolbar_fg_color, @toolbar_bg_color, 0.5);
}

/* menubar toolbars */
toolbar menubar {
    -GtkToolbar-button-relief: normal;
}

/*******************
 * primary-toolbar *
 *******************/
.primary-toolbar,
.primary-toolbar toolbar,
.primary-toolbar > toolbar {
    -GtkWidget-window-dragging: true;

    padding: 4px;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@toolbar_bg_color, 0.8);
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                        @titlebar_bg_color,
                        shade(@titlebar_bg_color, 0.96),
                        shade(@titlebar_bg_color, 0.92)
                      );
    color: @toolbar_fg_color;
}

.primary-toolbar:backdrop,
.primary-toolbar toolbar:backdrop,
.primary-toolbar toolbar:backdrop {
    color: @theme_unfocused_fg_color;
    background-image: none;
    background-color: @theme_unfocused_bg_color;
}

/* primary toolbar button */
.primary-toolbar combobox,
.primary-toolbar button {
    padding: 4px 8px;
    border-width: 1px;
    border-color: transparent;
    border-radius: 4px;
    background-color: shade(@theme_base_color, 1.0);
    background-image: none;
    box-shadow: none;
    color: @toolbar_fg_color;
}

.primary-toolbar .raised button,
.primary-toolbar .raised button,
toolbar combobox,
toolbar button {
    padding: 2px 10px;
    border-width: 1px;
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: image(shade(shade(@theme_bg_color, 0.95), 1.1));
    color: @toolbar_fg_color;
}

.primary-toolbar .raised button:backdrop,
.primary-toolbar .raised button:backdrop,
toolbar combobox:backdrop,
toolbar button:backdrop {
    border-top-color: shade(@theme_bg_color, 0.95);
    border-right-color: shade(@theme_bg_color, 0.85);
    border-left-color: shade(@theme_bg_color, 0.85);
    border-bottom-color: shade(@theme_bg_color, 0.75);
    background-image: image(shade(shade(@theme_bg_color, 0.91), 1.1));
    color: @theme_unfocused_fg_color;
}

.primary-toolbar .raised button:checked:backdrop,
.primary-toolbar .raised button:checked:backdrop,
toolbar combobox:checked:backdrop,
toolbar button:checked:backdrop {
    background-image: none;
    background-color: shade(@theme_unfocused_bg_color, 0.8);
    border-color: shade(@theme_unfocused_bg_color, 0.75);
    color: shade(@theme_unfocused_fg_color, 0.9);
}

.primary-toolbar button:hover,
.primary-toolbar button:checked,
toolbar button:hover {
}

.primary-toolbar button:active,
toolbar button:active {
    border-color: transparent;
    background-color: shade(@toolbar_bg_color, 0.95);
    background-image: none;
}

.primary-toolbar button:active:hover,
toolbar button:active:hover {
    border-color: transparent;
}

.primary-toolbar button:focus,
.primary-toolbar button:hover:focus,
.primary-toolbar button:active:focus,
.primary-toolbar button:active:hover:focus,
toolbar button:focus,
toolbar button:hover:focus,
toolbar button:active:focus,
toolbar button:active:hover:focus {
    border-color: shade(@toolbar_bg_color, 0.7);
}

.primary-toolbar button:disabled,
toolbar button:disabled {
    /*border-color: shade(@theme_base_color, 0.7);
    background-color: shade(@theme_base_color, 0.8);
    background-image: none;*/
    color: alpha(@theme_fg_color, 0.7);
}

.primary-toolbar button:active *:disabled,
toolbar button:active *:disabled {
    /*border-color: transparent;
    background-color: shade(@toolbar_bg_color, 0.80);
    background-image: none;*/
    color: alpha(@theme_fg_color, 0.7);
}

.primary-toolbar entry,
toolbar entry {
    border-color: shade(@toolbar_bg_color, 0.95);
}

.primary-toolbar entry:active,
.primary-toolbar entry:focus,
toolbar entry:active,
toolbar entry:focus {
    border-color: transparent;
    box-shadow: inset 0 0 2px 1px shade(@theme_selected_bg_color, 1.15);
}

.primary-toolbar entry:backdrop,
toolbar entry:backdrop {
    background-color: shade(@theme_base_color, 0.98);
    border-color: shade(@toolbar_bg_color, 0.95);
}

/* inline-toolbar */
.inline-toolbar toolbar {
    -GtkToolbar-button-relief: normal;

    padding: 1px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
    background-color: @theme_bg_color;
    background-image: none;
}

.inline-toolbar toolbar:last-child {
    border-width: 0 1px 1px 1px;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
}

.inline-toolbar toolbar button {
    padding: 1px;
    border-width: 1px 0 1px 1px;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    border-radius: 0;
    background-color: shade(@theme_bg_color, 1.08);
    background-image: none;
    color: @theme_fg_color;
}

.inline-toolbar toolbar button:hover {
    border-color: shade(@theme_bg_color, 0.7);
    background-color: shade(@theme_bg_color, 1.10);
    background-image: none;
}

.inline-toolbar toolbar button:active {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.95);
    background-image: none;
}

.inline-toolbar toolbar button:active:hover {
    border-color: shade(@theme_bg_color, 0.7);
}

.inline-toolbar toolbar button:focus,
.inline-toolbar toolbar button:hover:focus,
.inline-toolbar toolbar button:active:focus,
.inline-toolbar toolbar button:active:hover:focus {
    border-color: shade(@theme_bg_color, 0.7);
}

.inline-toolbar toolbar button:disabled,
.inline-toolbar toolbar toolbutton button:disabled {
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.9);
    background-image: none;
}

.inline-toolbar toolbar button:active *:disabled
.inline-toolbar toolbar toolbutton button:active *:disabled {
    border-color: shade(@theme_bg_color, 0.75);
    background-color: shade(@theme_bg_color, 0.80);
    background-image: none;
}

/* linked widgets */
.linked entry, .linked button, .linked combobox box.linked button {
    border-radius: 0;
    border-left-width: 0;
}

.linked entry:first-child, .linked button:first-child, .linked combobox:first-child box.linked button {
    border-left-width: 1px;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

.linked entry:last-child, .linked button:last-child, .linked combobox:last-child box.linked button {
    border-left-width: 0;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

.linked entry:only-child, .linked button:only-child, combobox:only-child box.linked button {
    border-width: 1px;
    border-radius: 3px;
}

.linked entry:focus, .linked entry:last-child:focus {
    box-shadow: -1px 0 @theme_selected_bg_color;
}
    
.linked entry:first-child:focus {
    box-shadow: none;
}

.vertical.linked entry, .vertical.linked button, .vertical.linked combobox box.linked button {
    border-left-width: 1px;
    border-top-width: 0;
    border-radius: 0;
}

.vertical.linked entry:first-child, .vertical.linked button:first-child, .vertical.linked combobox:first-child box.linked button {
    border-top-width: 1px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.vertical.linked entry:last-child, .vertical.linked button:last-child, .vertical.linked combobox:last-child box.linked button {
    border-top-width: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}

.vertical.linked entry:only-child, .vertical.linked button:only-child, .vertical.linked combobox .linked:only-child button {
    border-top-width: 1px;
}
    
.vertical.linked entry:focus, .vertical.linked entry:last-child:focus {
    box-shadow: 0 -1px @theme_selected_bg_color;
}

.vertical.linked entry:first-child:focus {
    box-shadow: none;
}

.vertical.linked spinbutton button:first-child {
    border-width: 1px;
    border-top-width: 0;
    border-left-width: 1px;
}

.vertical.linked spinbutton button:last-child {
    border-width: 0;
    border-left-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/***********
 * tooltip *
 ***********/
tooltip {
    border-radius: 4px;
    box-shadow: none;
}

tooltip.background {
    border: 1px solid shade(@tooltip_bg_color, 0.8);
    background-color: @tooltip_bg_color;
    background-clip: padding-box;
}

tooltip.background label {
    padding: 1px;
}

tooltip * {
    background-color: transparent;
    color: @tooltip_fg_color;
}

tooltip decoration {
    border-radius: 4px;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.1);
}

/************
 * treeview *
 ************/
treeview {
    -treeview-vertical-separator: 0;
}

treeview.dnd {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_selected_bg_color;
    border-radius: 0;
}

treeview entry {
    padding: 0 6px;
    border-radius: 0;
    background-color: @theme_base_color;
    background-image: none;
}

/************
 * viewport *
 ************/
GtkViewport frame {
    border-width: 0;
}

.view {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

.view:disabled,
.view:disabled:disabled {
    background-color: shade(@theme_base_color, 0.9);
    color: mix(@theme_fg_color, @theme_bg_color, 0.5);
}

.view:selected,
.view:selected:focus {
    background-color: @theme_selected_bg_color;
    color: @theme_selected_fg_color;
}

/* backdrop state */
.view:selected:backdrop, iconview:selected:backdrop, .view:selected:backdrop, iconview:selected:backdrop {
    background-color: shade(@theme_bg_color, 0.8);
}

/**************
 * action-bar *
 **************/
actionbar {
    padding: 4px;
    border-width: 1px 0 0 0;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    background-color: @theme_bg_color;
    background-image: none;
    color: @theme_fg_color;
}

actionbar button.text-button {
    padding: 4px;
}

actionbar button .image-button {
    padding: 6px;
}

actionbar .title {
    font-weight: bold;
    padding: 0 12px;
}

actionbar .subtitle {
    font-size: smaller;
    padding: 0 12px;
}

/***************
 * search bars *
 ***************/
.search-bar {
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: shade(@theme_bg_color, 0.85);
    background-color: shade(@theme_bg_color, 0.98);
}

.search-bar button.close-button {
    padding: 4px;
}

/********************
 * various choosers *
 ********************/
fontbutton separator,
filechooser button separator {
    /* always disable separators */
    -GtkWidget-horizontal-separator: 0;
    -GtkWidget-vertical-separator: 0;
}

fontbutton label:last-child {
    color: alpha(currentColor, 0.7);
}

filechooser button image:last-child {
    color: alpha(currentColor, 0.7);
}

/*********************
 * app notifications *
 *********************/
.app-notification {
    border-style: solid;
    border-color: shade(@theme_base_color, 0.8);
    border-width: 0 1px 1px 1px;
    border-radius: 0 0 2px 2px;
    padding: 8px;
    background-color: @theme_base_color;
    background-image: none;
    color: @theme_text_color;
}

.app-notification border {
    border: none;
}

/*******
 * osd *
 *******/
.background.osd {
    color: @osd_fg;
    background-color: @osd_bg;
}

GtkOverlay.osd {
    background-color: transparent;
}

.osd frame {
    background-clip: border-box;
    background-origin: border-box;
}

.osd button,
.osd button {
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@osd_bg, 0.8);
    border-radius: 4px;
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
    color: @osd_fg;
}

.osd button:hover {
    border-color: shade(@osd_bg, 0.7);
    background-color: shade(@osd_bg, 1.10);
    background-image: none;
}

.osd button:active,
.osd menubutton button:active {
    border-color: shade(@osd_bg, 0.8);
    background-color: shade(@osd_bg, 0.95);
    background-image: none;
}

.osd button:active:hover,
.osd button:active:hover,
.osd menubutton button:active:hover {
    border-color: shade(@osd_bg, 0.7);
}

.osd button:disabled,
.osd button:disabled {
    border-color: shade(@osd_bg, 0.85);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd button:active *:disabled,
.osd button:active *:disabled {
    background-color: shade(@osd_bg, 0.80);
    background-image: none;
}

.osd toolbar {
    -GtkToolbar-button-relief: normal;

    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-radius: 4px;
    border-color: shade(@osd_bg, 0.8);
    background-color: @osd_bg;
    background-image: none;
    color: @osd_fg;
}

.osd toolbar button {
    padding: 4px;
    border-width: 1px;
    border-style: solid;
    border-color: shade(@osd_bg, 0.8);
    border-radius: 4px;
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
    color: @osd_fg;
}

.osd toolbar button:hover {
    border-color: shade(@osd_bg, 0.7);
    background-color: shade(@osd_bg, 1.10);
    background-image: none;
}

.osd toolbar button:active {
    border-color: shade(@osd_bg, 0.8);
    background-color: shade(@osd_bg, 0.95);
    background-image: none;
}

.osd toolbar button:active:hover {
    border-color: shade(@osd_bg, 0.7);
}

.osd toolbar button:focus,
.osd toolbar button:hover:focus,
.osd toolbar button:active:focus,
.osd toolbar button:active:hover:focus {
    border-color: shade(@osd_bg, 0.7);
}

.osd toolbar button:disabled {
    border-color: shade(@osd_bg, 0.85);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd toolbar button:active *:disabled {
    border-color: shade(@osd_bg, 0.75);
    background-color: shade(@osd_bg, 0.80);
    background-image: none;
}

.osd toolbar button:first-child {
    border-radius: 4px 0 0 2px;
    border-width: 1px 0 1px 1px;
    box-shadow: inset -1px 0 shade(@osd_bg, 0.9);
}

.osd toolbar button:last-child {
    box-shadow: none;
    border-radius: 0 2px 2px 0;
    border-width: 1px 1px 1px 0;
}

.osd toolbar button:only-child,
.osd toolbar toolbutton button,
.osd toolbar toolbutton:only-child button,
.osd toolbar toolbutton:last-child button,
.osd toolbar toolbutton:first-child button {
    border-width: 1px;
    border-radius: 4px;
    border-style: solid;
}

.osd toolbar separator {
    color: shade(@osd_bg, 0.9);
}

/* used by gnome-settings-daemon's media-keys OSD */
.osd trough {
    background-color: shade(@osd_bg, 0.8);
}

.osd progress {
    background-color: @osd_fg;
}

.osd scale slider {
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
    /* we will draw the border using box shadow for now */
    box-shadow: inset 1px 0 shade(@osd_bg, 0.8),
                inset 0 1px shade(@osd_bg, 0.8),
                inset -1px 0 shade(@osd_bg, 0.8),
                inset 0 -1px shade(@osd_bg, 0.8);
}

.osd scale slider:hover {
    box-shadow: inset 1px 0 shade(@osd_bg, 0.7),
                inset 0 1px shade(@osd_bg, 0.7),
                inset -1px 0 shade(@osd_bg, 0.7),
                inset 0 -1px shade(@osd_bg, 0.7);
}

.osd scale slider:disabled {
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
    box-shadow: inset 1px 0 shade(@osd_bg, 0.85),
                inset 0 1px shade(@osd_bg, 0.85),
                inset -1px 0 shade(@osd_bg, 0.85),
                inset 0 -1px shade(@osd_bg, 0.85);
}

.osd scale trough {
    border-color: shade(@osd_bg, 0.8);
    background-color: shade(@osd_bg, 1.08);
    background-image: none;
}

.osd scale trough highlight {
    border-color: @theme_selected_bg_color;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

.osd scale trough:disabled,
.osd scale trough highlight:disabled {
    border-color: shade(@osd_bg, 0.85);
    background-color: shade(@osd_bg, 0.9);
    background-image: none;
}

.osd progressbar,
progressbar.osd {
    -progressbar-xspacing: 0;
    -progressbar-yspacing: 2px;
    -progressbar-min-horizontal-bar-height: 2px;

    padding: 0;
}

.osd progressbar trough,
progressbar.osd trough {
    padding: 0;
    border-style: none;
    border-radius: 0;
    background-image: none;
    background-color: transparent;
}

.osd progressbar progress,
progressbar.osd progress {
    border-style: none;
    border-radius: 0;
    background-color: @theme_selected_bg_color;
    background-image: none;
}

.osd view,
.osd.view {
    background-color: @osd_base;
}

/* TODO: Try to fix this */
.osd .scrollbar trough {
    background-color: @osd_bg;
}

.osd .scrollbar slider {
    border-width: 0px;
    border-color: mix(shade(@osd_base, 0.87), @osd_fg, 0.21);
    border-radius: 6px;
    background-color: mix(@osd_base, @osd_fg, 0.21);
}

.osd .scrollbar slider:hover {
    border-color: mix(shade(@osd_base, 0.87), @osd_fg, 0.31);
    background-color: mix(@osd_base, @osd_fg, 0.31);
}

.osd .scrollbar slider:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: @theme_selected_bg_color;
}

.osd view.cell:selected,
.osd view.cell:selected:focus {
    background-color: transparent;
    border-style: solid;
    border-radius: 4px;
    border-width: 3px;
    border-color: @osd_fg;
    outline-color: transparent;
}

/* used by Documents */
.osd .page-thumbnail {
    border-style: solid;
    border-width: 1px;
    border-color: shade(@osd_bg, 0.9);
    /* when there's no pixbuf yet */
    background-color: @osd_bg;
}

/******************************
 * destructive action buttons *
 ******************************/
.destructive-action button {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@error_color, 0.8);
    border-radius: 4px;
    background-color: @error_color;
    background-image: none;
    color: mix(@theme_selected_fg_color, @error_color, 0.1);
}

.destructive-action button:hover {
    border-color: shade(@error_color, 0.7);
    background-color: shade(@error_color, 1.12);
    background-image: none;
}

.destructive-action button:active {
    border-color: shade(@error_color, 0.8);
    background-color: shade(@error_color, 0.87);
    background-image: none;
}

.destructive-action button:hover:active {
    border-color: shade(@error_color, 0.7);
}

/******************************
 * suggested action buttons *
 ******************************/
button.suggested-action {
    background-image: linear-gradient(to bottom,
                        shade(@selected_bg_color, 1.25),
                        shade(@selected_bg_color, 0.99)
                      );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.65);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.5);
}

button.suggested-action:active {
    background-image: linear-gradient(to bottom,
                            shade(@selected_bg_color, 1.2),
                            shade(@selected_bg_color, 0.95)
                          );
    box-shadow: 0 0 1px 1px shade(@theme_selected_bg_color, 1.6);
    color: @theme_selected_fg_color;
    border-color: shade(@theme_selected_bg_color, 1.4);
}

/******************
 * selection mode *
 ******************/
.selection-mode headerbar,
.selection-mode toolbar {
    border-style: solid;
    border-color: @theme_selected_bg_color;
    background-color: shade(@theme_selected_bg_color, 1.6);
    background-image: none;
    color: @theme_selected_bg_color;
}

.selection-mode headerbar {
    border-top-color: shade(@theme_selected_bg_color, 1.6);
    border-bottom-color: @theme_selected_bg_color;
}

.selection-mode toolbar {
    padding: 4px;
}

/* regular button */
.selection-mode headerbar button,
.selection-mode toolbar button,
.selection-mode toolbar toolbutton button {
    border-width: 1px;
    border-style: solid;
    border-color: @theme_selected_bg_color;
    border-radius: 4px;
    background-color: shade(@theme_selected_bg_color, 1.68);
    background-image: none;
    color: shade(@theme_selected_bg_color, 0.8);
}

.selection-mode headerbar button:hover,
.selection-mode toolbar button:hover,
.selection-mode toolbar toolbutton button:hover {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: shade(@theme_selected_bg_color, 1.70);
    background-image: none;
}

.selection-mode headerbar button:active,
.selection-mode toolbar button:active,
.selection-mode toolbar toolbutton button:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: shade(@theme_selected_bg_color, 1.55);
    background-image: none;
}

.selection-mode headerbar button:hover:active,
.selection-mode toolbar button:hover:active,
.selection-mode toolbar toolbutton button:hover:active {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

/* suggested button */
.selection-mode headerbar button.suggested-action,
.selection-mode toolbar button.suggested-action,
.selection-mode toolbar toolbuttonbutton.suggested-action {
    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.9);
    border-radius: 4px;
    background-color: shade(@theme_selected_bg_color, 1.18);
    background-image: none;
    color: mix(@theme_selected_fg_color, @theme_selected_bg_color, 0.1);
}

.selection-mode headerbar button.suggested-action:hover,
.selection-mode toolbar button.suggested-action:hover,
.selection-mode toolbar toolbuttonbutton.suggested-action:hover {
    border-color: shade(@theme_selected_bg_color, 0.8);
    background-color: shade(@theme_selected_bg_color, 1.20);
    background-image: none;
}

.selection-mode headerbar button.suggested-action:active,
.selection-mode toolbar button.suggested-action:active,
.selection-mode toolbar toolbutton.suggested-action:active {
    border-color: shade(@theme_selected_bg_color, 0.9);
    background-color: shade(@theme_selected_bg_color, 1.05);
    background-image: none;
}

.selection-mode headerbar button.suggested-action:hover:active,
.selection-mode toolbar button.suggested-action:hover:active,
.selection-mode toolbar toolbuttonbutton.suggested-action:hover:active {
    border-color: shade(@theme_selected_bg_color, 0.8);
}

/* menu button */
.selection-mode headerbar .selection-menu button,
.selection-mode toolbar .selection-menu button {
    border-style: none;
    background-color: transparent;
    background-image: none;
    color: shade(@theme_selected_bg_color, 0.8);
}

.selection-mode toolbar .dim-label,
.selection-mode toolbar .selection-menu button .dim-label {
    color: shade(@theme_selected_bg_color, 0.7);
}

.selection-mode headerbar .selection-menu button:hover,
.selection-mode toolbar .dim-label:hover,
.selection-mode toolbar .selection-menu button:hover,
.selection-mode toolbar .selection-menu button .dim-label:hover {
    color: shade(@theme_selected_bg_color, 0.7);
}

.selection-mode headerbar .selection-menu button:active,
.selection-mode toolbar .selection-menu button:active {
    color: shade(@theme_selected_bg_color, 0.8);
    box-shadow: none;
}

/*************************
 * touch text selections *
 *************************/
GtkBubbleWindow {
    border-radius: 4px;
    background-clip: border-box;
}

GtkBubbleWindow.osd.background {
    background-color: @osd_bg;
}

GtkBubbleWindow toolbar {
    background-color: transparent;
}

/******************
 * Stack switcher *
 ******************/
.stack-switcher button {
    min-height: 20px;
    min-width: 80px;
    box-shadow: none;
}

.stack-switcher button:checked,
.stack-switcher button:checked:hover,
.stack-switcher button:checked:backdrop,
.stack-switcher button:checked:hover:backdrop {
    background-image: linear-gradient(to bottom,
                        shade(@selected_bg_color, 1.2),
                        shade(@selected_bg_color, 0.95)
                      );
    color: @theme_selected_fg_color;
    box-shadow: none;
}

/*******
 * CSD *
 *******/
decoration {
    border-radius: 4px 4px 0 0;
    border-width: 0px;
    box-shadow: 0 3px 9px 1px rgba(0,0,0,0.3), 0 0 0 1px rgba(0, 0, 0, 0.23);
    margin: 10px;
}

decoration:backdrop {
    box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.18);
    transition: 200ms ease-out;
}

.maximized headerbar,
.maximized headerbar:backdrop,
.tiled .titlebar:not(headerbar),
.tiled .titlebar:backdrop:not(headerbar),
.maximized .titlebar:not(headerbar),
.maximized .titlebar:backdrop:not(headerbar) {
    border-radius: 0;
}

.popup decoration {
    box-shadow: none;
}

.ssd decoration {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.23);
}

/*tooltip.csd decoration {
    border-radius: 0;
    box-shadow: none;
}
 */
messagedialog.csd decoration {
    border-radius: 4px 4px 0 0;
    background-color: @theme_bg_color;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13);
}

.solid-csd decoration {
    margin: 0;
    padding: 4px;
    background-color: @theme_bg_color;
    border: solid 1px shade(@theme_bg_color, 0.8);
    border-radius: 0;
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.3), inset 0 1px rgba(20, 20, 20, 0.8);
}

.solid-csd decoration:backdrop {
    box-shadow: inset 0 0 0 3px rgba(0,0,0,0.3), inset 0 1px rgba(20, 20, 20, 0.8);
}

/* titlebutton */
.titlebar .titlebutton {
    padding: 1px;
    border-style: none;
    background: none;
    color: @theme_fg_color;
    -gtk-icon-shadow: none;
}

.titlebar .titlebutton:hover,
.titlebar .titlebutton:hover:focus {
    background: none;
    color: @theme_fg_color;
}

.titlebar .titlebutton:active,
.titlebar .titlebutton:active:hover {
    background: none;
    color: @theme_fg_color;
    box-shadow: none;
}

.titlebar .titlebutton:backdrop {
    background-image: none;
    color: @theme_unfocused_fg_color;
    -gtk-icon-shadow: none;
}

.titlebar button.flat.toggle:active {
    background-color: transparent;
}

/* decoration for windows */
.titlebar,
.titlebar:not(headerbar) {
    border-radius: 4px 4px 0 0;
    background-color: transparent;
    background-image: linear-gradient(to bottom,
                        shade(@titlebar_bg_color, 1.05),
                        shade(@titlebar_bg_color, 0.95)
                      );
    color: mix(@titlebar_fg_color, @titlebar_bg_color, 0.1);
    text-shadow: none;
    min-height: 20px;
}

.titlebar:backdrop,
.titlebar:not(headerbar):backdrop {
    background-image: none;
    background-color: @theme_unfocused_bg_color;
    color: @theme_unfocused_fg_color;
    text-shadow: none;
}
    
/* CSD */
headerbar.default-decoration,
.csd headerbar.default-decoration, 
.default-decoration.titlebar:not(headerbar),
.csd .default-decoration.titlebar:not(headerbar) {
    min-height: 28px;
    padding: 0 3px;
    background-color: @toolbar_bg_color;
    background-image: image(@toolbar_bg_color);
    border-bottom-width: 0;
}

headerbar.default-decoration:backdrop,
.csd headerbar.default-decoration:backdrop,
.default-decoration.titlebar:backdrop:not(headerbar),
.csd .default-decoration.titlebar:backdrop:not(headerbar) {
    background-color: @theme_unfocused_bg_color;
    background-image: image(@theme_unfocused_bg_color);
}
